#!/usr/bin/python
# -*- coding: utf8 -*-
from ipsum import ipsum

import xmpp
from plugin import Plugin

class IpsumModule(Plugin):
    infos = {'name': 'Ipsum',
            'author': 'magnetik',
            'version': '0.1.1',
            'website':'http://blog.magnetik.org',
            'handlers': ['ipsum'],
            'cmd': 'ipsum',
            }
    doc=_(u"Commande retourtant une phrase aléatoire")
    
    def ipsum(self,conn,user,command,args,mess,lang):
        temp=ipsum()
        conn.send(xmpp.protocol.Message(mess.getFrom(),temp.phrase(),"chat"))
